package com.ssy.lingxi.order.model.dto;

import com.ssy.lingxi.order.model.constant.OrderPromotionTypeEnum;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 营销活动商品DTO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-11-01
 */
public class PromotionProductDTO implements Serializable {
    private static final long serialVersionUID = -4047772138274902543L;

    public PromotionProductDTO() {
        this.promotionType = OrderPromotionTypeEnum.NONE.getCode();
        this.productId = 0L;
        this.skuId = 0L;
        this.parentSkuId = 0L;
        this.groupNo = 0;
        this.quantity = BigDecimal.ZERO;
        this.discount = BigDecimal.ONE;
        this.price = BigDecimal.ZERO;
        this.refPrice = BigDecimal.ZERO;
        this.promotionAmount = BigDecimal.ZERO;
        this.gifts = new ArrayList<>();
        this.subProducts = new ArrayList<>();
        this.promotions = new ArrayList<>();
    }

    /**
     * 营销活动类型，定义在 OrderPromotionTypeEnum 中
     */
    private Integer promotionType;

    /**
     * 商品id
     */
    private Long productId;

    /**
     * 商品SkuId
     */
    private Long skuId;

    /**
     *  如果是被换购的商品，此值为关联的换购商品的SkuId
     */
    private Long parentSkuId;

    /**
     * 分组编号(套餐主商品)
     */
    private Integer groupNo;

    /**
     * 数量
     */
    private BigDecimal quantity;

    /**
     * 会员折扣
     */
    private BigDecimal discount;

    /**
     * 单价（原价）
     */
    private BigDecimal price;

    /**
     * 到手价（套餐到手价）
     */
    private BigDecimal refPrice;

    /**
     * 单个商品通过营销活动减少的金额
     */
    private BigDecimal promotionAmount;

    /**
     * 赠品列表
     */
    private List<SubProductDTO> gifts;

    /**
     * 套餐商品
     */
    private List<SubProductDTO> subProducts;

    /**
     * 赠送优惠券
     */
    private List<OrderGiveCouponDTO> giveCouponDTOList;

    /**
     * 商品关联的营销活动
     */
    private List<PromotionDTO> promotions;

    public Integer getPromotionType() {
        return promotionType;
    }

    public void setPromotionType(Integer promotionType) {
        this.promotionType = promotionType;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getParentSkuId() {
        return parentSkuId;
    }

    public void setParentSkuId(Long parentSkuId) {
        this.parentSkuId = parentSkuId;
    }

    public Integer getGroupNo() {
        return groupNo;
    }

    public void setGroupNo(Integer groupNo) {
        this.groupNo = groupNo;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getRefPrice() {
        return refPrice;
    }

    public void setRefPrice(BigDecimal refPrice) {
        this.refPrice = refPrice;
    }

    public BigDecimal getPromotionAmount() {
        return promotionAmount;
    }

    public void setPromotionAmount(BigDecimal promotionAmount) {
        this.promotionAmount = promotionAmount;
    }

    public List<SubProductDTO> getGifts() {
        return gifts;
    }

    public void setGifts(List<SubProductDTO> gifts) {
        this.gifts = gifts;
    }

    public List<SubProductDTO> getSubProducts() {
        return subProducts;
    }

    public void setSubProducts(List<SubProductDTO> subProducts) {
        this.subProducts = subProducts;
    }

    public List<PromotionDTO> getPromotions() {
        return promotions;
    }

    public void setPromotions(List<PromotionDTO> promotions) {
        this.promotions = promotions;
    }

    public List<OrderGiveCouponDTO> getGiveCouponDTOList() {
        return giveCouponDTOList;
    }

    public void setGiveCouponDTOList(List<OrderGiveCouponDTO> giveCouponDTOList) {
        this.giveCouponDTOList = giveCouponDTOList;
    }
}
